const fs = require('fs')

let data = "Hello NodeJS，你好，NodeJS"

fs.writeFile('./data/hello.txt', data, err => {
    if (err) throw err;
    console.log('The file has been saved!');
})